<template>
  <div id="app" class="ceshi appBgImg">
    <tab-bar  v-show="$route.meta.tt"></tab-bar>
    <router-view v-if="isRouterAlive"></router-view>
    <bottom  v-show="$route.meta.tt"></bottom>
  </div>
</template>

<script>
import tabBar from './components/tabbar.vue';
import bottom from './components/bottom.vue';
import background from './components/background.vue'
export default {
  name: 'App',
  components:{
    tabBar,
    bottom,
    background
  },
  provide () {    //父组件中通过provide来提供变量，在子组件中通过inject来注入变量。
    return {
        reload: this.reload
    }
  },
  data() {
    return{
        isRouterAlive: true                    //控制视图是否显示的变量
    }
  },
  mounted(){
    this.fileType.ClickOnLove(window,document);
  },
  methods: {
    reload () {
        this.isRouterAlive = false;            //先关闭，
        this.$nextTick(function () {
            this.isRouterAlive = true;         //再打开
        })
    },
    // createLoves(){
		// 		this.$refs.background.createLoves(event)
		// 	},
		// 	removeSmallHert(){
		// 		this.$refs.background.removeSmallHert()
    // 	}

  },
}
</script>

<style scoped>
</style>
